<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<html>
<head>
	<title>Title</title>
	<jsp:include page="/layout/_import.jsp"></jsp:include>
</head>
<body>
<jsp:include page="/layout/_nav.jsp"></jsp:include>

<div class="container">
	<main role="main" class="pb-3">
		<c:if test="${not empty msg}">
			<div class="alert alert-danger" role="alert">
					${msg}
			</div>
		</c:if>
		<form action="/Visit" method="post" novalidate="novalidate">
			<input type="hidden" value="${param.petId}" name="petId">
			<div class="form-group row">
				<label class="col-sm-2" for="vet">医生</label>
				<div class="col-sm-10">
					<input class="form-control" type="text" list="vets" data-val="true" data-val-maxlength="名字的长度不能大于20" data-val-maxlength-max="100" data-val-required="宠物的主人是必要的" id="vet" maxlength="20" name="vet">
					<datalist id="vets">
						<c:forEach items="${vets}" var="v">
								<option value="${v.name}"></option>
						</c:forEach>
					</datalist>
					<span class="invalid field-validation-valid" data-valmsg-for="vet" data-valmsg-replace="true"></span>
				</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2" for="description">病情描述</label>
				<div class="col-sm-10">
					<input value="" class="form-control" type="text" data-val="true" data-val-maxlength="长度不能超过100" data-val-maxlength-max="100" data-val-required="描述是必须的" id="description" maxlength="100" name="description">
					<span class="invalid field-validation-valid" data-valmsg-for="description" data-valmsg-replace="true"></span>
				</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2" for="treatment">治疗方案</label>
				<div class="col-sm-10">
					<input value="" class="form-control" type="text" data-val="true" data-val-maxlength="长度不能超过100" data-val-maxlength-max="100" data-val-required="方案是必须的" id="treatment" maxlength="100" name="treatment">
					<span class="invalid field-validation-valid" data-valmsg-for="treatment" data-valmsg-replace="true"></span>
				</div>
			</div>
			<div class="form-group row">
				<div class="col-sm-12">
					<a class="btn btn-secondary" href="${pervPage}">返回列表</a>
                    <c:if test="${user!=null && user.role=='admin'}">
                        <input type="submit" class="btn btn-primary" value="确认添加">
                    </c:if>
				</div>
			</div>
		</form>


	</main>
</div>
</body>
</html>
